import request from '@/utils/request'

// 查询工艺配置列表
export function listProcess(query) {
  return request({
    url: '/process/process/list',
    method: 'get',
    params: query
  })
}

// 查询工艺配置详细
export function getProcess(processId) {
  return request({
    url: `/process/process/${processId}`,
    method: 'get'
  })
}

// 新增工艺配置
export function addProcess(data) {
  return request({
    url: '/process/process',
    method: 'post',
    data: data
  })
}

// 修改工艺配置
export function updateProcess(data) {
  return request({
    url: '/process/process',
    method: 'put',
    data: data
  })
}

// 删除工艺配置
export function delProcess(processId) {
  return request({
    url: `/process/process/${processId}`,
    method: 'delete'
  })
}

// 添加压紧数据检测配置
export function addPressCheck(data) {
  return request({
    url: '/process/process/addPressCheck',
    method: 'post',
    data
  })
}

// 修改压紧数据检测配置
export function updatePressCheck(data) {
  return request({
    url: '/process/process/updatePressCheck',
    method: 'post',
    data
  })
}

// 删除压紧数据检测配置
export function deletePressCheck(data) {
  return request({
    url: '/process/process/deletePressCheck',
    method: 'post',
    data
  })
}

// 查询压紧数据检测配置
export function getPressCheckList(processStepId) {
  return request({
    url: `process/process/getPressCheckList/${processStepId}`,
    method: 'get'
  })
}

// 添加压装程序参数配置
export function addPressConfig(data) {
  return request({
    url: '/process/process/addPressConfig',
    method: 'post',
    data
  })
}

// 查询压装程序参数配置
export function getPressConfigList(params) {
  return request({
    url: '/process/process/getPressConfigList',
    method: 'get',
    params
  })
}

// 修改压装程序参数配置
export function editPressConfig(data) {
  return request({
    url: '/process/process/editPressConfig',
    method: 'post',
    data
  })
}
